struct domain idle0_task = IDLE0_TASK(idle0_task);
-/*
- * per-CPU TSS segments. Threads are completely 'soft' on Linux,
- * no more per-task TSS's. The TSS size is kept cacheline-aligned
- * so they are allowed to end up in the .data.cacheline_aligned
- * section. Since TSS's are completely CPU-local, we want them
- * on exact cacheline boundaries, to eliminate cacheline ping-pong.
- */
-struct tss_struct init_tss[NR_CPUS] __cacheline_aligned;
+struct tss_struct init_tss[NR_CPUS];
#include <xen/sched.h>
#include <asm/smpboot.h>
-irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned;
+irq_desc_t irq_desc[NR_IRQS];
static void __do_IRQ_guest(int irq);
unsigned long cr0;
/* If non-NULL, specifies a foreign subject domain for some operations. */
struct domain *foreign;
-} percpu_info[NR_CPUS] __cacheline_aligned;
+} __cacheline_aligned percpu_info[NR_CPUS];
/*
* Returns the current foreign domain; defaults to the currently-executing
static volatile unsigned long cpu_callout_map;
/* Per CPU bogomips and other parameters */
-struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned;
+struct cpuinfo_x86 cpu_data[NR_CPUS];
/* Set when the idlers are all forked */
int smp_threads_ready;
void set_tss_desc(unsigned int n, void *addr)
{
- _set_tssldt_desc(gdt_table+__TSS(n), (int)addr, 8299, 0x89);
+ _set_tssldt_desc(
+ gdt_table + __TSS(n),
+ (int)addr,
+ offsetof(struct tss_struct, __cacheline_filler) - 1,
+ 0x89);
}
void __init trap_init(void)
. = ALIGN(4096);
.data.page_aligned : { *(.data.idt) } :text
- . = ALIGN(32);
- .data.cacheline_aligned : { *(.data.cacheline_aligned) } :text
-
__bss_start = .; /* BSS */
.bss : {
*(.bss)
. = ALIGN(4096);
.data.page_aligned : { *(.data.idt) } :text
- . = ALIGN(32);
- .data.cacheline_aligned : { *(.data.cacheline_aligned) } :text
-
__bss_start = .; /* BSS */
.bss : {
*(.bss)
#include <asm/domain_page.h>
/* Both these structures are protected by the domlist_lock. */
-rwlock_t domlist_lock __cacheline_aligned = RW_LOCK_UNLOCKED;
+rwlock_t domlist_lock = RW_LOCK_UNLOCKED;
struct domain *domain_hash[DOMAIN_HASH_SIZE];
struct domain *domain_list;
irq_cpustat_t irq_stat[NR_CPUS];
-static softirq_handler softirq_handlers[NR_SOFTIRQS] __cacheline_aligned;
+static softirq_handler softirq_handlers[NR_SOFTIRQS];
asmlinkage void do_softirq()
{
*/
#define SMP_CACHE_BYTES 64
#define NR_CPUS 16
-#define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
-#define ____cacheline_aligned __cacheline_aligned
/* Linkage for x86 */
#define asmlinkage __attribute__((regparm(0)))
#include <xen/config.h>
#include <xen/cache.h>
-/* assembly code in softirq.h is sensitive to the offsets of these fields */
typedef struct {
unsigned int __softirq_pending;
unsigned int __local_irq_count;
unsigned int __nmi_count;
unsigned long idle_timestamp;
-} ____cacheline_aligned irq_cpustat_t;
+} __cacheline_aligned irq_cpustat_t;
#include <xen/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
int cpunumber; /* Logical CPU number */
char *irqstackptr; /* top of irqstack */
unsigned long volatile *level4_pgt;
-} ____cacheline_aligned;
+} __cacheline_aligned;
#define PDA_STACKOFFSET (5*8)
#define IOBMP_BYTES 8192
#define IOBMP_BYTES_PER_SELBIT (IOBMP_BYTES / 64)
#define IOBMP_BITS_PER_SELBIT (IOBMP_BYTES_PER_SELBIT * 8)
-#define IOBMP_OFFSET offsetof(struct tss_struct,io_bitmap)
+#define IOBMP_OFFSET offsetof(struct tss_struct, io_bitmap)
#define IOBMP_INVALID_OFFSET 0x8000
struct i387_state {
u16 trace;
#endif
u16 bitmap;
- u8 io_bitmap[IOBMP_BYTES];
+ u8 io_bitmap[IOBMP_BYTES+1];
/* Pads the TSS to be cacheline-aligned (total size is 0x2080). */
- u32 __cacheline_filler[6];
+ u8 __cacheline_filler[23];
};
struct trap_bounce {
#ifdef CONFIG_X86_INTEL_USERCOPY
extern struct movsl_mask {
int mask;
-} ____cacheline_aligned_in_smp movsl_mask;
+} __cacheline_aligned movsl_mask;
#endif
#define __addr_ok(addr) ((unsigned long)(addr) < HYPERVISOR_VIRT_START)
struct per_cpu_gdt {
struct ldttss_desc tss;
struct ldttss_desc ldt;
-} ____cacheline_aligned;
+} __cacheline_aligned;
struct Xgt_desc_struct {
#define SMP_CACHE_BYTES L1_CACHE_BYTES
#endif
-#ifndef ____cacheline_aligned
-#define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
-#endif
-
-#ifndef ____cacheline_aligned_in_smp
-#ifdef CONFIG_SMP
-#define ____cacheline_aligned_in_smp ____cacheline_aligned
-#else
-#define ____cacheline_aligned_in_smp
-#endif /* CONFIG_SMP */
-#endif
-
#ifndef __cacheline_aligned
-#ifdef MODULE
-#define __cacheline_aligned ____cacheline_aligned
-#else
-#define __cacheline_aligned \
- __attribute__((__aligned__(SMP_CACHE_BYTES), \
- __section__(".data.cacheline_aligned")))
+#define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
#endif
-#endif /* __cacheline_aligned */
#endif /* __LINUX_CACHE_H */
struct irqaction *action; /* IRQ action list */
unsigned int depth; /* nested irq disables */
spinlock_t lock;
-} ____cacheline_aligned irq_desc_t;
+} __cacheline_aligned irq_desc_t;
extern irq_desc_t irq_desc[NR_IRQS];
#include <xen/config.h>
#include <xen/types.h>
#include <xen/spinlock.h>
+#include <xen/cache.h>
#include <asm/regs.h>
#include <xen/smp.h>
#include <asm/page.h>